package com.wwj.core.wawa.entity.mapper;

import com.wwj.core.wawa.entity.Player;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * Created by Administrator on 2017/11/3.
 */
public interface PlayerMapper {
    void insertPlayer(Player player);

    Player selectPlayerById(Integer id);

    Player selectPlayerByInviteCode(String inviteCode);

    void updatePlayer(Player player);

    List<Player> selectPlayerByPage(Map<String,Object> params);

    List<Player> selectPlayersByRoomId(int roomId);

    List<Player> selectPlayerIteamByPage(Map<String,Object> params);

    Player selectPlayerByWechatOpenId(String openId);

    void updateStatus(Map<String,Object> params)throws Exception;

    void updatePlayerPlaySuccess(Integer id);

    void updatePlayerPlayFailed(Integer id);

    void updatePlayerHasFirstRecharge(@Param("id") Integer id, @Param("hasFirstRecharge") int hasFirstRecharge);

    List<Player> selectPlayerRank();

    List<Player> selectRoomPlayerRank(int roomId);

    List<Player> selectPlayerByInvitor(@Param("invitorId") Integer invitorId, @Param("search") String search);
}
